package com.mairuide.casemanage.dao;

import com.mairuide._frame.base.BaseRepository;
import com.mairuide.casemanage.pojo.CaseManage;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 数据访问接口
 * @author Administrator
 *
 */
public interface CaseManageDao extends BaseRepository<CaseManage> {
   // @Query(value = "select * from tb_case_manage t where t.case_authority = ?1 or t.create_id=?2 ", nativeQuery = true)  Integer case_authority,
    @Query(value = "select * from tb_case_manage t where  t.create_id=?1 ", nativeQuery = true)
    List<CaseManage> findByCaseAuthorityOrCreateId(Integer create_id );
    
    /**
     * 根据uuid查询案件信息
     * @param caseUuid
     * @return
     */
    @Query(value = "select * from tb_case_manage t where  t.case_uuid=?1 ", nativeQuery = true)
    CaseManage findByCaseUuid(String caseUuid);
}
